class  MyArray<T> {
    public Object[] array = new Object[5];


    public void set (int pos, T val){
        array[pos] = val;
    }


    public T get(int pos){
        return (T)array[pos];
    }


}
public class Test {

    public static void main(String[] args) {
        MyArray<Integer> a = new MyArray<>();
        a.set(0, 10);
        Integer b = a.get(0);
        System.out.println(b);
    }
}
